package learningThread.syn.synchronizedMethodLockObj.lock.condition.which;


public class TestCondition {

    public static void main(String[] args) {
        try {
            MyService myService = new MyService();
            MyThreadA myThreadA = new MyThreadA(myService);
            MyThreadB myThreadB = new MyThreadB(myService);

            myThreadA.start();
            myThreadB.start();
            Thread.sleep(3000);
            myService.signalA();

            Thread.sleep(10000);
            myService.signalB();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
